feat(cli,core): M2 — CLI MVP + settings.json + permissions matcher + credentials#2
Merged
Conversation
…credentials
Implements DEVELOPMENT_PLAN.md §6 M2 core scope. Adds CI fix from M1's first
run-failure.
What ships
----------
Core (packages/core/src/):
- config/types.ts — full ~50-field DeepCodeSettings schema
- config/loader.ts — 3-layer load/merge (user → project → local)
- config/permissions.ts — 4 rule pattern types (bare / subcommand `:*` /
prefix ` *` / domain `domain:`); precedence
deny > ask > allow
- credentials/index.ts — Keychain (macOS) + chmod-600 file fallback;
dual header (apiKey / authToken); apiKeyHelper
shell-resolver
CLI (apps/cli/src/):
- parse-args.ts — dependency-free argv parser, 27 flags
- commands.ts — 14 slash commands + registry (/help /clear /exit
/status /model /mode /effort /cost /context
/config /add-dir /resume /init /todos)
- repl.ts — readline-based REPL, agent dispatch, event render
- onboarding.ts — hidden-input API key prompt (★ mask, raw mode)
- trust.ts — ~/.deepcode/trusted-dirs.json persistence
- cli.ts — bin entry: flag dispatch → onboarding/REPL/doctor
CI:
- .github/workflows/ci.yml — remove `version: 9` (conflicted with package.json's
packageManager field, made setup-pnpm fail on
ubuntu runner)
Tests
-----
- packages/core/src/config/loader.test.ts (8 tests)
- packages/core/src/config/permissions.test.ts (25 tests, all 4 pattern types)
- packages/core/src/credentials/index.test.ts (11 tests, file backend)
- apps/cli/src/parse-args.test.ts (14 tests)
- apps/cli/src/commands.test.ts (13 tests)
- apps/cli/src/trust.test.ts (5 tests)
Total: 151 passed / 4 skipped (ripgrep-deps) / 0 failed across all packages.
Smoke (apps/cli/dist/cli.js):
- --version → 0.1.0
- --help → full usage
- doctor → environment summary
- --nope → 'Unknown or invalid flags' + exit 2
Docs
----
- docs/cli-flags.md — every flag with milestone status
- docs/milestones/M2.md — delivery report + design decisions + what's deferred
Deferred to M3+
---------------
Trust-dialog UX prompt, apiKeyHelper 401-refresh-loop, 16 of 30 slash commands,
--allowedTools enforcement, --system-prompt threading, headless -p mode,
--resume interactive picker. All have parser-level acceptance — enforcement
arrives with their owning subsystem.
Verified
--------
pnpm typecheck → green (tsc -b project references)
pnpm build → all packages emit dist/
pnpm test → 151 passed
pnpm format:check → all conformant
node apps/cli/dist/cli.js --version → 0.1.0
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 tasks
oratis
added a commit
that referenced
this pull request
May 28, 2026
) Aligns the desktop client to docs/VISUAL_DESIGN.html. Phase 1 covers the three highest-traffic surfaces — Onboarding, Sidebar (Sessions), and the main Chat/REPL — built on a shared design system. The remaining 6 screens ship in 0.1.2 (P2). **Version bumps (everywhere consistent now):** - tauri.conf.json 0.1.0 → 0.1.1 - apps/desktop/package.json 0.1.0 → 0.1.1 - apps/cli/package.json 0.1.0 → 0.1.1 - src-tauri/Cargo.toml 0.1.0 → 0.1.1 - CHANGELOG.md added **Design tokens (apps/desktop/src/index.css):** - DeepSeek brand blue (#4D6BFE) + soft (#E8EDFF) + mint (#14E4A2) - Dark-mode 4-tier surface (--bg-0/1/2/3) + 4-tier text + line/line-soft - --radius-sm/--radius/--radius-lg + spec --shadow - Inter + JetBrains Mono via @import (matches design) - ~700 lines replacing the old hand-rolled utility classes from M6 **Primitives (apps/desktop/src/components/):** - BrandMark — elephant SVG in gradient .mark / .mark-lg container - Badge — ok / warn / err / info (matches design tool-card statuses) - Pill — chat-header status chips with optional leading dot - ToolCard — head (▸ name · target · badge) + body (mono, scrollable, diff-add / diff-del color) - InspectorRail — 48 px right column with 6 rail buttons **3-column shell (App.tsx rewrite):** - Grid: 240 px sidebar | 1fr main | 48 px inspector rail - Onboarding bypasses shell (standalone hero per design screen #2) - Sidebar lists sessions bucketed by Today/Yesterday/Earlier with active state highlight and relative-time meta column - Inspector rail surfaces Plan badge, context fill, files, info, settings (expand panel deferred to P2) **Chat redesign (Repl.tsx rewrite):** - chat-header with crumb + 3 status pills (connected · model · approval) - chat-stream renders msg.user / msg.assistant rows with 28 px avatars (YO for user, DC gradient for assistant) - Tool calls appear inline as ToolCard components with status badge reflecting running / done / error - Inline approval (Approve / Reject / Always allow) sits IMMEDIATELY under the relevant tool card per spec note ③ (not at screen bottom) - composer is the design's .box + .toolbar: + button · mode badge (clickable to cycle default→plan→bypass) · vim chip (when on) · model picker (clickable to toggle chat ↔ reasoner) · effort dropdown · send button. Below: ctx-bar with token usage + cost estimate - Streaming cursor (.streaming-cursor) appears at end of assistant text while turn is active **Onboarding redesign:** - Standalone hero: radial-gradient bg, big brand chip, gradient-text headline matching design screen #2 - Form panel with .input style + helper link to platform.deepseek.com + Continue button with loading spinner **Conversation fix carries forward:** - dangerouslyAllowBrowser: true is bundled in the new Vite output (verified via grep on dist/assets) - Version bump to 0.1.1 lets users definitively verify they installed the new build via the About screen All workspaces typecheck clean. 533+ tests pass. Bundle is 673 KB (vs. 660 KB before — added ~13 KB for the new components + tokens). Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
CI will validate ripgrep-dependent grep tests (skipped locally).
Documentation
Release notes label
What's NOT in this PR
Parser accepts but enforcement deferred to M3+ subsystems:
Design notes flagged for review
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com